package com.fanrenqiji.entity;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created by yanwt on 2017/3/1.
 * 课程事件 任务
 */
@Getter
@Setter
@Entity
@Table(name="tb_event")
@org.hibernate.annotations.Table(appliesTo = "tb_event",comment = "课程事件表")
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate
@org.hibernate.annotations.Cache(region="event", usage = CacheConcurrencyStrategy.READ_WRITE)
public class EventEntity extends DataEntity{
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    @Column(columnDefinition="varchar(5) default null comment '序号'")
    private String seq;
    @Column(columnDefinition="varchar(200) default null comment '事件名称'")
    private String name;
    @Column(columnDefinition = ("int(1) default null comment '事件类型 \t\n" +
            "0:录音，1录像，2拍照，3计时，4计数，5评价，6评分，7作业，8答案'"))
    private int type;
    @Column(name = "url",columnDefinition="varchar(200) default null comment '相关地址'")
    private String url;

    @Column(name="description",columnDefinition="text default null comment '事件描述'")
    private String description;

    @Column(name="abstract_content",columnDefinition="text default null comment '事件简介'")
    private String abstractContent;

    @Column(name="status",columnDefinition = ("int(1) not null comment '状态 1:开始，2:暂停，3:结束'"))
    private int status;

    @Column(columnDefinition=("TINYINT(1) default null comment '类型:正式1，试听0'"))
    private int formal;

    @Column(name="start_time",columnDefinition="varchar(50) default null comment '开始时间'")
    private String startTime;
    @Column(name="end_time",columnDefinition="varchar(50) default null comment '结束时间'")
    private String endTime;

    @Column(name="seconds",columnDefinition = ("int(11) not null comment '事件持续事件'"))
    private int seconds;

    @Column(name="knowledge",columnDefinition = ("int(11) not null comment '知识点'"))
    private int knowledge;

    @Column(name = "wxfirst",columnDefinition="varchar(200) default null comment '微信消息标题'")
    private String wxfirst;
    @Column(name = "wxkeyword1",columnDefinition="varchar(200) default null comment '微信消息关键字1'")
    private String wxkeyword1;
    @Column(name = "wxkeyword2",columnDefinition="varchar(200) default null comment '微信消息关键字2'")
    private String wxkeyword2;
    @Column(name = "wxremark",columnDefinition="varchar(200) default null comment '微信消息备注'")
    private String wxremark;

    @Column(name = "wxtitle",columnDefinition="varchar(200) default null comment '消息标题'")
    private String wxtitle;
    @Column(name = "wxurl",columnDefinition="varchar(200) default null comment '消息地址'")
    private String wxurl;
    @Column(name = "wxpic",columnDefinition="varchar(200) default null comment '图片地址'")
    private String wxpic;
    @Column(name = "wxcontent",columnDefinition="varchar(200) default null comment '消息内容'")
    private String wxcontent;

    @Column(columnDefinition="text not null comment '成功标题'")
    private String title;

    @Column(columnDefinition="text not null comment '成功描述'")
    private String message;

}
